home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Tcl-Tk 8.0 / Pre-installed version / tcl8.0 / mac / tclMacLibrary.r < prev    next >
Encoding:
Text File  |  1997-08-15  |  6.9 KB  |  223 lines  |  [TEXT/CWIE]

  1. /* 
  2.  * tclMacLibrary.r --
  3.  *
  4.  *    This file creates resources used by the Tcl shared library.
  5.  *    Many thanks go to "Jay Lieske, Jr." <lieske@princeton.edu> who
  6.  *    wrote the initial version of this file.
  7.  *
  8.  * Copyright (c) 1996 Sun Microsystems, Inc.
  9.  *
  10.  * See the file "license.terms" for information on usage and redistribution
  11.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  12.  *
  13.  * SCCS: @(#) tclMacLibrary.r 1.4 97/08/13 16:53:02
  14.  */
  15.  
  16. #include <Types.r>
  17. #include <SysTypes.r>
  18.  
  19. /*
  20.  * The folowing include and defines help construct
  21.  * the version string for Tcl.
  22.  */
  23.  
  24. #define RESOURCE_INCLUDED
  25. #include "tcl.h"
  26.  
  27. #if (TCL_RELEASE_LEVEL == 0)
  28. #   define RELEASE_LEVEL alpha
  29. #elif (TCL_RELEASE_LEVEL == 1)
  30. #   define RELEASE_LEVEL beta
  31. #elif (TCL_RELEASE_LEVEL == 2)
  32. #   define RELEASE_LEVEL final
  33. #endif
  34.  
  35. #if (TCL_RELEASE_LEVEL == 2)
  36. #   define MINOR_VERSION (TCL_MINOR_VERSION * 16) + TCL_RELEASE_SERIAL
  37. #else
  38. #   define MINOR_VERSION TCL_MINOR_VERSION * 16
  39. #endif
  40.  
  41. resource 'vers' (1) {
  42.     TCL_MAJOR_VERSION, MINOR_VERSION,
  43.     RELEASE_LEVEL, 0x00, verUS,
  44.     TCL_PATCH_LEVEL,
  45.     TCL_PATCH_LEVEL ", by Ray Johnson © Sun Microsystems"
  46. };
  47.  
  48. resource 'vers' (2) {
  49.     TCL_MAJOR_VERSION, MINOR_VERSION,
  50.     RELEASE_LEVEL, 0x00, verUS,
  51.     TCL_PATCH_LEVEL,
  52.     "Tcl Library " TCL_PATCH_LEVEL " © 1996"
  53. };
  54.  
  55. /*
  56.  * Currently the creator for all Tcl/Tk libraries and extensions
  57.  * should be 'TclL'.  This will allow those extension and libraries
  58.  * to use the common icon for Tcl extensions.  However, this signature
  59.  * still needs to be approved by the signature police at Apple and may
  60.  * change.
  61.  */
  62. #define TCL_CREATOR 'TclL'
  63. #define TCL_LIBRARY_RESOURCES 2000
  64.  
  65. /*
  66.  * The 'BNDL' resource is the primary link between a file's
  67.  * creator/type and its icon.  This resource acts for all Tcl shared
  68.  * libraries; other libraries will not need one and ought to use
  69.  * custom icons rather than new file types for a different appearance.
  70.  */
  71.  
  72. resource 'BNDL' (TCL_LIBRARY_RESOURCES, "Tcl bundle", purgeable) 
  73. {
  74.     TCL_CREATOR,
  75.     0,
  76.     {    /* array TypeArray: 2 elements */
  77.         /* [1] */
  78.         'FREF',
  79.         {    /* array IDArray: 1 elements */
  80.             /* [1] */
  81.             0, TCL_LIBRARY_RESOURCES
  82.         },
  83.         /* [2] */
  84.         'ICN#',
  85.         {    /* array IDArray: 1 elements */
  86.             /* [1] */
  87.             0, TCL_LIBRARY_RESOURCES
  88.         }
  89.     }
  90. };
  91.  
  92. resource 'FREF' (TCL_LIBRARY_RESOURCES, purgeable) 
  93. {
  94.     'shlb', 0, ""
  95. };
  96.  
  97. type TCL_CREATOR as 'STR ';
  98. resource TCL_CREATOR (0, purgeable) {
  99.     "Tcl Library " TCL_PATCH_LEVEL " © 1996"
  100. };
  101.  
  102. /*
  103.  * The 'kind' resource works with a 'BNDL' in Macintosh Easy Open
  104.  * to affect the text the Finder displays in the "kind" column and
  105.  * file info dialog.  This information will be applied to all files
  106.  * with the listed creator and type.
  107.  */
  108.  
  109. resource 'kind' (TCL_LIBRARY_RESOURCES, "Tcl kind", purgeable) {
  110.     TCL_CREATOR,
  111.     0, /* region = USA */
  112.     {
  113.         'shlb', "Tcl Library"
  114.     }
  115. };
  116.  
  117.  
  118. /*
  119.  * The -16397 string will be displayed by Finder when a user
  120.  * tries to open the shared library. The string should
  121.  * give the user a little detail about the library's capabilities
  122.  * and enough information to install the library in the correct location.  
  123.  * A similar string should be placed in all shared libraries.
  124.  */
  125. resource 'STR ' (-16397, purgeable) {
  126.     "Tcl Library\n\n"
  127.     "This is the core library needed to run Tool Command Language programs. "
  128.     "To work properly, it should be placed in the ‘Tool Command Language’ folder "
  129.     "within the Extensions folder."
  130. };
  131.  
  132. /* 
  133.  * The mechanisim below loads Tcl source into the resource fork of the
  134.  * application.  The example below creates a TEXT resource named
  135.  * "Init" from the file "init.tcl".  This allows applications to use
  136.  * Tcl to define the behavior of the application without having to
  137.  * require some predetermined file structure - all needed Tcl "files"
  138.  * are located within the application.  To source a file for the
  139.  * resource fork the source command has been modified to support
  140.  * sourcing from resources.  In the below case "source -rsrc {Init}"
  141.  * will load the TEXT resource named "Init".
  142.  */
  143.  
  144. read 'TEXT' (TCL_LIBRARY_RESOURCES, "Init", purgeable) "::library:init.tcl";
  145. read 'TEXT' (TCL_LIBRARY_RESOURCES + 1, "History", purgeable) "::library:history.tcl";
  146.  
  147. /*
  148.  * The following are icons for the shared library.
  149.  */
  150.  
  151. data 'icl4' (2000, "Tcl Shared Library", purgeable) {
  152.     $"0FFF FFFF FFFF FFFF FFFF FFFF FFFF 0000"
  153.     $"F000 0000 0000 0000 0000 0000 000C F000"
  154.     $"F0CC CFFF CCCC CCC6 66CC CCCC CCCC F000"
  155.     $"F0CC CFFF FFFF FF66 F6CC CCCC CCCC F000"
  156.     $"F0CC CFFF 2000 0D66 6CCC CCCC CCCC F000"
  157.     $"F0CC CFFF 0202 056F 6E5C CCCC CCCC F000"
  158.     $"F0CC CFFF 2020 C666 F66F CCCC CCCC F000"
  159.     $"F0CC CFFF 0200 B66F 666B FCCC CCCC F000"
  160.     $"F0FC CFFF B020 55F6 6F52 BFCC CCCC F000"
  161.     $"FF0F 0CCC FB02 5665 66D0 2FCC CCCC F0F0"
  162.     $"F00F 0CCC CFB0 BF55 F6CF FFCC CCCC FFCF"
  163.     $"000F 0CCC CCFB 06C9 66CC CCCC CCCC F0CF"
  164.     $"000F 0CCC CCCF 56C6 6CCC CCCC CCCC CCCF"
  165.     $"000F 0CCC CCCC 6FC6 FCCC CCCC CCCC CCCF"
  166.     $"000F 0CCC CCCC 65C5 65CC CCCC CCCC CCCF"
  167.     $"000F 0CCC CCCC 55D6 57CC CCCC CCCC CCCF"
  168.     $"000F 0CCC CCCC 65CF 6CCC CCCC CCCC CCCF"
  169.     $"000F 0CCC CCCC 5AC6 6CFF CCCC CCCC CCCF"
  170.     $"000F 0CCC CCCC 65C5 6CF0 FCCC CCCC CCCF"
  171.     $"000F 0CCC CCCC CECF CCF0 0FCC CCCC CCCF"
  172.     $"000F 0CCC CCCC C5C6 CCCF 20FC CCCC FCCF"
  173.     $"F00F 0CCC CCCF FFD5 CCCC F20F CCCC FFCF"
  174.     $"FF0F 0CCC CCCF 20CF CCCC F020 FCCC F0F0"
  175.     $"F0F0 CCCC CCCF B2C2 FFFF 0002 0FFC F000"
  176.     $"F00C CCCC CCCC FBC0 2000 0020 2FFC F000"
  177.     $"F0CC CCCC CCCC CFCB 0202 0202 0FFC F000"
  178.     $"F0CC CCCC CCCC CCCF B020 2020 2FFC F000"
  179.     $"F0CC CCCC CCCC CCDC FBBB BBBB BFFC F000"
  180.     $"F0CC CCCC CCCC CCCC CFFF FFFF FFFC F000"
  181.     $"F0CC CCCC CCCC CCCC CCCC CCCC CFFC F000"
  182.     $"FCCC CCCC CCCC CCCC CCCC CCCC CCCC F000"
  183.     $"0FFF FFFF FFFF FFFF FFFF FFFF FFFF 0000"
  184. };
  185.  
  186. data 'ICN#' (2000, "Tcl Shared Library", purgeable) {
  187.     $"7FFF FFF0 8000 0008 8701 C008 87FF C008"
  188.     $"8703 8008 8707 E008 8707 F008 870F F808"
  189.     $"A78F EC08 D0CF C40A 906F DC0D 1035 C009"
  190.     $"101D 8001 100D 8001 100D C001 100D C001"
  191.     $"100D 8001 100D B001 100D A801 1005 2401"
  192.     $"1005 1209 901D 090D D011 088A A018 F068"
  193.     $"800C 0068 8005 0068 8001 8068 8000 FFE8"
  194.     $"8000 7FE8 8000 0068 8000 0008 7FFF FFF0"
  195.     $"7FFF FFF0 FFFF FFF8 FFFF FFF8 FFFF FFF8"
  196.     $"FFFF FFF8 FFFF FFF8 FFFF FFF8 FFFF FFF8"
  197.     $"FFFF FFF8 DFFF FFFA 9FFF FFFF 1FFF FFFF"
  198.     $"1FFF FFFF 1FFF FFFF 1FFF FFFF 1FFF FFFF"
  199.     $"1FFF FFFF 1FFF FFFF 1FFF FFFF 1FFF FFFF"
  200.     $"1FFF FFFF 9FFF FFFF DFFF FFFA FFFF FFF8"
  201.     $"FFFF FFF8 FFFF FFF8 FFFF FFF8 FFFF FFF8"
  202.     $"FFFF FFF8 FFFF FFF8 FFFF FFF8 7FFF FFF0"
  203. };
  204.  
  205. data 'ics#' (2000, "Tcl Shared Library", purgeable) {
  206.     $"FFFE B582 BB82 B3C2 BFA2 43C3 4381 4381"
  207.     $"4381 4763 4392 856E 838E 81AE 811E FFFE"
  208.     $"FFFE FFFE FFFE FFFE FFFE FFFF 7FFF 7FFF"
  209.     $"7FFF 7FFF 7FFF FFFE FFFE FFFE FFFE FFFE"
  210. };
  211.  
  212. data 'ics4' (2000, "Tcl Shared Library", purgeable) {
  213.     $"FFFF FFFF FFFF FFF0 FCFF DED5 6CCC CCF0"
  214.     $"FCFF C0D6 ECCC CCF0 FCFF 2056 65DC CCF0"
  215.     $"FDFE D256 6DAC CCFF FFCC DDDE 5DDC CCEF"
  216.     $"0FCC CD67 5CCC CCCF 0FCC CC5D 6CCC CCCF"
  217.     $"0FCC CC5D 5CCC CCCF 0FCC CCD5 5CCC CCCF"
  218.     $"FFCC CFFD CCFF CCFF FCCC CF2D DF20 FCFC"
  219.     $"FCCC CCFD D202 FEF0 FCCC CC0D 2020 FEF0"
  220.     $"FCCC CCCD FBBB FEF0 FFFF FFFF FFFF FFE0"
  221. };
  222.  
  223.